<template>
    <div>
        Child
    </div>
</template>
<script>
export default {
    // 组件卸载时执行
    beforeUnmount() {
        console.log("beforeUnmount");
        console.log(document.getElementById("main"));
    },
    unmounted() {
        console.log("unmounted");
        console.log(document.getElementById("main"));
    },
}
</script>